package com.shuaitao.myblog.controller;


import com.shuaitao.myblog.service.BlogService;
import com.shuaitao.myblog.service.UserService;
import com.shuaitao.myblog.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
@CrossOrigin
public class UserController {


    @Autowired
    private UserService userService;


    @RequestMapping("/test")
    public R test() {
        return R.ok();
    }

    @RequestMapping("/getUserInfo/{userId}")
    public R getUserInfo(@PathVariable("userId")String userId) {
        R r = userService.getUserInfo(userId);
        return r;

    }
}
